package Z008NumberAndString.NS10MyStringBuffer;

public class MyStringBuffer implements IStringBuffer{

    int capacity = 15;
    int length = 0 ;
    char[] value;
    public MyStringBuffer(){
        value = new char[capacity];
    }

    public MyStringBuffer(String str){
        if(null != str){
            value = str.toCharArray();
        }
        length = value.length;
        if (capacity < value.length){
            capacity = value.length*2;
            value = new char[capacity];
        }
//        if (capacity >= str.length()){
//            capacity = value.length
//        }
    }



    @Override
    public void append(String str) {

    }

    @Override
    public void append(int pos, char b) {

    }

    @Override
    public void insert(int pos, char str) {

    }

    @Override
    public void insert(int pos, String b) {

    }

    @Override
    public void delete(int start) {

    }

    @Override
    public void delete(int start, int end) {

    }

    @Override
    public void reverse() {

    }

    @Override
    public int length() {
        return 0;
    }
}
